﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication1.DAO.Helper;
using WebApplication1.DAO;
using System.Collections;

namespace WebApplication1
{
    public partial class svgdraw : System.Web.UI.Page
    {
        /// <summary>
        /// 处理格式与前端共享变量
        /// </summary>
        public string visId = null;
        public string visName = null;
        public string visValue = null;
        public string visMeasure = null;
        public int count;

        protected void Page_Load(object sender, EventArgs e)
        {
            List<string> id1 = new List<string>();
            List<string> name1 = new List<string>();
            List<string> value1 = new List<string>();
            List<string> meas1 = new List<string>();
            Dictionary<string, List<string>> getInfo = new Dictionary<string, List<string>>();
            db objDao = new db();
            getInfo = objDao.GetValueInfo();
            id1 = getInfo["id"];
            name1 = getInfo["name"];
            value1 = getInfo["value"];
            meas1 = getInfo["meas"];

            //id1.Add(getInfo["id"].ToString());
            //name1.Add(getInfo["name"].ToString());
            //value1.Add(getInfo["value"].ToString());
            //meas1.Add(getInfo["meas"].ToString());

            visId = string.Join(",", id1.ToArray());
            visName = string.Join(",", name1.ToArray());
            visValue = string.Join(",", value1.ToArray());
            visMeasure = string.Join(",", meas1.ToArray());

            //visId = id1.ToArray();
            //visName = name1.ToArray();
            //visValue = value1.ToArray();
            //visMeasure = meas1.ToArray();
           
            count = id1.Count();
        }
    }
}